import { defineStore } from 'pinia'
import { ElMessage } from "element-plus"
import { ref, reactive } from "vue"
export const orderStatisticsStore = defineStore('orderStatisticsStoreId', () => {
    /*******************************数据***************************** */
    const tableProps =reactive({
        name: 'productList',
        propsList: [
            {
                type: 'normal',
                prop: 'id',
                label: '序号',
                minWidth: '100px',
                hidden:true,
            },
            {
                type: 'normal',
                prop: 'data',
                label: '渠道编码',
                minWidth: '200px',
                hidden:true,
            },
            {
                type: 'normal',
                prop: 'order',
                label: '日期',
                minWidth: '200px',
                hidden:true,
            },
            {
                type: 'normal',
                prop: 'order1',
                label: '签约人数',
                minWidth: '200px',
                hidden:true,
            },
            {
                type: 'normal',
                prop: 'order2',
                label: '解约人数',
                minWidth: '200px',
                hidden:true,
            },
            {
                type: 'normal',
                prop: 'order3',
                label: '扣费人数',
                minWidth: '200px',
                hidden:true,
            },
            {
                type: 'normal',
                prop: 'order4',
                label: '退款人数',
                minWidth: '200px',
                hidden:true,
            },
            {
                type: 'normal',
                prop: 'order5',
                label: '扣费金额',
                minWidth: '200px',
                hidden:true,
            },
            {
                type: 'normal',
                prop: 'order6',
                label: '退款金额',
                minWidth: '200px',
                hidden:true,
            },  
            {
                type: 'handle',
                label: '操作',
                minWidth: '200',
                btnType: ' link',
                slotName:'handle',
                hidden:true,
            }
        ]
    })  
    const listSearch = reactive({
        orders: ["created_time desc"],
        condition: {
        },
        pageSize: 20,
        pageNum: 1
    })
    const pageParams = reactive({
        tableHeight: 400,
        total: 0,
        loadIng: false,
        tableData: []
    })
    /*******************************方法***************************** */
    return {
        listSearch,pageParams,tableProps
    }
})